package com.cinc.ebc.mm.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinc.ebc.mm.entity.MmMaterialStock;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cinc.ebc.mm.entity.MmStockInOut;
import com.cinc.ebc.mm.entity.MmStockInOutDetail;
import com.cinc.ebc.mm.model.MmMaterialStockAllocateModel;
import com.cinc.ebc.mm.model.MmRptMaterialStockWarehouseStatModel;
import com.cinc.ebc.mm.model.MmRptMaterialStockWarehouseStatTotalModel;
import com.cinc.ebc.mm.vo.MmRptMaterialStockStatPage;


import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 库存量
 * @Author: jeecg-boot
 * @Date:   2022-04-10
 * @Version: V1.0
 */
public interface IMmMaterialStockService extends IService<MmMaterialStock> {

    boolean saveMaterialStock(MmMaterialStock entity) throws Exception;

    boolean updateByStockInOutDetail(MmStockInOut mmStockInOut, List<MmStockInOutDetail> mmStockInOutDetailList, boolean isAllocate) throws Exception;

    /**
     * 已分配量更新
     *
     * @param allocateModel
     * @return void
     * @throws
     */
    void updateStockAllocate(MmMaterialStockAllocateModel allocateModel) throws Exception;

    IPage<MmRptMaterialStockWarehouseStatModel> queryRptWarehouseStatList(Page<MmRptMaterialStockWarehouseStatModel> page, MmRptMaterialStockStatPage mmRptMaterialStockStatPage);

    MmRptMaterialStockWarehouseStatTotalModel queryRptWarehouseStatTotal(MmRptMaterialStockStatPage mmRptMaterialStockStatPage);
}
